    <div class="container container-gary top-red">
        <!-- page banner -->
        <div class="product-detail wrap1">
            <div class="product-intro">
                <div class="cart-title clearfix">
                    <h3>全部商品</h3>
                </div>
                <div class="cart-thead clearfix">
                    <div class="column cart-checked">
                        <div class="checked-total"><input tabindex="1" type="checkbox" class="ck_all"><label for="">全选</label></div>
                    </div>
                    <div class="column cart-pro">商品信息</div>
                    <div class="column cart-s-text">选中按钮</div>
                    <div class="column cart-color">颜色</div>
                    <div class="column cart-size">尺码</div>
                    <div class="column cart-price">单价（元）</div>
                    <div class="column cart-num"><span>数量</span></div>
                    <div class="column cart-sum">小计（元）</div>
                    <div class="column cart-action"><span>操作</span></div>
                </div>
                <div class="cart-list">
				{foreach name="$list" item="w"}
                    <div class="cart-item-list">
						{if condition="$w.warehouse_id gt 0"}
						<div class="cart-shop cart-f-none">
							<div class="checked-total"><input tabindex="1" type="checkbox" class="ck_group"><label for=""><b>{$w.warehouse_name}</b></label></div>
						</div>
						{/if}
                        <div class="cart-t-list">
                            {foreach name="$w.shop" item="s"}
							<div class="cart-dashed {if condition='$w.warehouse_id eq 0'}cart-d-shop{/if}">
                                <div class="cart-head clearfix">
                                    <div class="head-name"><i></i>店铺：<span class="red">{$s.shop_name}</span></div>
                                    <div class="head-contact"><i></i><a href="">联系买家</a></div>
                                </div>
								{foreach name="$s.class" item="c"}
                                <div class="cart-content">
                                    <div class="c-content-left">
                                        <dl>
                                            <dt><a href="product-detail.shtml"><img src="{$c.classPic}" /></a></dt>
                                            <dd><a href="product-detail.shtml">{$c.class_name}{$c.customcode}</a></dd>
                                        </dl>
                                    </div>
                                    <div class="c-content-right">
                                        <ul>
											{foreach name="$c.goods" item="g"}
                                            <li class="clearfix">
                                                <div class="column c-left"><div class="checked-total"><input tabindex="1" type="checkbox" class="ck_item" name="items" gid="{$g.goods_id}"></div></div>
                                                <div class="column cart-color">{$g.color_name}</div>
                                                <div class="column cart-size">{$g.size_name}</div>
                                                <div class="column cart-price">￥<span>{$g.price}</span></div>
                                                <div class="column cart-num">
                                                    <input class="num-reduce" type="button" /> <input class="num-input" type="text" value="{$g.goods_num}" /> <input class="num-plus" type="button" />
                                                </div>
                                                <div class="column cart-sum"><b class="cart-n-total red">￥<span>{$g.totalPrice}</span></b></div>
                                                <div class="column cart-action"><i class="cart-del" id="{$g.id}"></i></div>
                                            </li>
											{/foreach}
                                        </ul>
                                    </div>
                                </div>
								{/foreach}
                            </div>
							{/foreach}
                        </div>
                    </div>
					{/foreach}

                    <div class="cart-ding"></div>
                    <div class="cart-item-bottom">
                        <div class="cart-item-total wrap clearfix">
                            <div class="c-total-checked"><div class="checked-total"><input class="ck_all" tabindex="1" type="checkbox"><label for="">全选（共 <span class="red pro_number">32</span> 件）</label></div></div>
                            <div class="c-total-del">删除选中的商品</div>
                            <div class="fr">
                                <div class="c-total-shop">已选商品 <span class="red pro_number">16</span> 件</div>
                                <div class="c-total-price">合计：<em class="red">￥<i id="priceTotal">168.00</i></em></div>
                                <div class="c-total-btn"><input type="button" value="确认结算" id="btn_settle" /></div>
                            </div>
                        </div>
                    </div>
                </div>

				{include file="trade/cart/_my" /}

            </div>

        </div>

    </div>

    <!-- cart del -->
    <div class="total-mask hide"></div>
    <div class="total-content hide">
        <div class="cart-d-content">
            <div class="cart-d-top clearfix">
                <div class="cart-d-img"><img src="/public/static/home/images/cart-del.png" /></div>
                <div class="cart-d-txt">
                    <h3>删除商品？</h3>
                    确认要删除该宝贝吗？
                </div>
                <div class="cart-d-icon"><i></i></div>
            </div>
            <div class="cart-d-a">
                <a class="cart-d-color">确认</a><a class="cart-d-gary">取消</a>
            </div>
        </div>
    </div>
	<input id="item" type="hidden" />

<script src="/public/static/home/js/cart.js"></script>
<script src="/public/static/home/js/icheck.js"></script>
<script type="text/javascript" src="/public/static/home/js/jquery.SuperSlide.2.1.1.js"></script>
<script>
	$(function () {
		$('.checked-total input').iCheck({
			checkboxClass: 'icheckbox_square-blue',
			radioClass: 'iradio_square-blue',
			increaseArea: '20%'
		});
		$('.ck_item').on('ifChanged', function (event) {
			showCheckbox();
			setTotal();
		});
		$('.ck_all').on('ifChecked', function (event) {
			$('.checked-total input').iCheck('check');
		});
		$('.ck_all').on('ifUnchecked', function (event) {
			$('.checked-total input').iCheck('uncheck');
		});
		$('.ck_group').on('ifChecked', function (event) {
			$(this).closest(".cart-item-list").find('.ck_item').iCheck('check');
			showCheckbox();
		});
		$('.ck_group').on('ifUnchecked', function (event) {
			$(this).closest(".cart-item-list").find('.ck_item').iCheck('uncheck');
			showCheckbox();
		});

		$(window).bind("scroll", function () {
			var top = $(this).scrollTop() + $(window).height() - $('.footer').height() - 20;
			var t = $(".cart-ding").offset().top;
			if (top > t) {
				$('.cart-item-bottom').removeClass('cart-item-fixed');
			} else {
				$('.cart-item-bottom').addClass('cart-item-fixed');
			}
		});

		//cart img scroll
		$(".cart-i-title span").bind("click",function(){
		   $(this).addClass("current").siblings().removeClass("current");
		   $(".cart-i-tab").hide().eq($(".cart-i-title span").index(this)).show();
		})
		jQuery(".picScroll-left").slide({
			  titCell:".hd ul",
			  mainCell:".bd ul",
			  autoPage:true,
			  effect:"leftLoop",
			  autoPlay:true,
			  scroll:5,
			  vis:5,
			  interTime:6000,
			  delayTime:700,
			  trigger:"click"
		});
		//cart del
		$(".cart-action i").click(function(){
		   $(".total-mask,.total-content").show();
		   var id = $(this).attr('id');
		   $('.cart-d-color').click(function(){
				deleteCartGoods(id);
		   });
		})
		$(".cart-d-icon i,.cart-d-gary").click(function(){
		   $(".total-mask,.total-content").hide();
		})

		// cart btn
		$(".c-total-btn").on("click",function(){
		   var selected =$('.ck_item:checked')
		   //var s= $(selected).attr("gid")
		   //alert(s)
		   //if(!selected.length){ alert("请选择商品！") }
		   //else{ self.location='cart-next.shtml' }
		})

		$("#btn_settle").click(function(){
			  var temp = [];
			  var selected =$('.ck_item:checked')
			  if(!selected.length){ alert("请选择商品！") }
			  else{
				$(".ck_item").each(function () {
				  if ($(this).is(":checked"))
				  {
					  temp.push($(this).attr("gid"));
				  }
			  });
			  }

			  $("#item").val(temp.join(","));
			  submitCart( temp.join(",") );
		 })

		 var submitCart = function(goodsIdStr){
			if(goodsIdStr=='') return false;
			$.post('/index/cart/submit.html', {goodsId:goodsIdStr}, function(rs){
				if(rs.error==0 && rs.url) location.href = rs.url;
			});
		 }

		 var deleteCartGoods = function(id){
			$.get('/index/cart/del.html', {id:id}, function(){
				$(".total-mask,.total-content").hide();
				location.reload();
			});
		 }
	});
	function showCheckbox() {
		if ($('.ck_item').size() == $('.ck_item:checked').size()) {
			$('.ck_all').prop("checked", true).iCheck('update');
		} else {
			$('.ck_all').prop("checked", false).iCheck('update');
		}
		$(".cart-item-list").each(function (index, row) {
			if ($(row).find(".ck_item").size() === $(row).find('.ck_item:checked').size()) {
				$(row).find(".ck_group").prop("checked", true).iCheck('update');
			} else {
				$(row).find(".ck_group").prop("checked", false).iCheck('update');
			}
		});
	}
	window.onload = function(){
	   $(".cart-i-content").find(".cart-i-tab").not(":first").hide()
	}
</script>